//
//  Int+Ex+Time.swift
//  aquariumstudio
//
//  Created by zj on 2022/11/3.
//  Copyright © 2022 LXF. All rights reserved.
//

import Foundation

extension Int{
    public func toTimeString() -> String {
        
        let second = self % 60
        let m = self / 60
        let minute = m % 60
        let h = m / 60
//        let hour = h % 60
        
        var str = ""
        if h > 0{
            str += h.toString(full_0: true,len: 2)
            str += ":"
        }
        
        if minute > 0{
            str += minute.toString(full_0: true,len: 2)
            str += ":"
        }else {
            str += "00"
            str += ":"
        }
        
        
        str += second.toString(full_0: true,len: 2)
        
        return str
    }
}
